package com.guestmanage.service;

import java.util.List;

import com.guestmanage.bean.RdgionYu2;
import com.guestmanage.bean.SpRecvLis;
import com.guestmanage.dao.SpRecvLisDAO;

public class SpRecvLisService {
	
	private SpRecvLisService(){};
	
	private static SpRecvLisService insetance=null;
	
	public static SpRecvLisService getInsetance(){
		if(insetance==null)
			insetance=new SpRecvLisService();
		return insetance;
	}
	
	private SpRecvLisDAO srldao=SpRecvLisDAO.getInsetance();
	
	public List<SpRecvLis> getSpRecvLis(String cityId,int pageSize,int pageNow){
		return srldao.getSpRecvLis(cityId,pageSize,pageNow);
	}
	
	public int getSpRecvLisCount(String cityId){
		return srldao.getSpRecvLisCount(cityId);
	}
	
	public SpRecvLis findById(int id){
		return srldao.findById(id);
	}
	
	public boolean update(int recvCount,int hourNum,int id){
		return srldao.update(recvCount,hourNum, id);
	}
	
	public boolean delete(int id){
		return srldao.delete(id);
	}
	
	public boolean save(SpRecvLis srl){
		return srldao.save(srl);
	}
	public RdgionYu2 findByCity(String city){
		return srldao.findByCity(city);
	}
	
	public List<RdgionYu2> findSheng(){
		return srldao.findSheng();
	}
	
	public List<RdgionYu2> findCityBySheng(String sheng){
		return srldao.findCityBySheng(sheng);
	}
	
	public List<SpRecvLis> findByCityAndHourNum(String cityId,int hourNum){
		return srldao.findByCityAndHourNum(cityId, hourNum);
	}
	
	public List<SpRecvLis> findByCityAndSP(String city,String spCode){
		return srldao.findByCityAndSP(city, spCode);
	}
	
	public List<SpRecvLis> findBySP(String city,String spNameCode){
		return srldao.findBySP(city,spNameCode);
	}
	
	public List<SpRecvLis> getSpRecvLis(String cityId,int hourNum){
		return srldao.getSpRecvLis(cityId, hourNum);
	}
}
